home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / dev / amos / sillysource5.lha / CHASE.AMOS / CHASE.amosSourceCode < prev    next >
AMOS Source Code  |  1980-01-18  |  6KB  |  208 lines

  1. Screen Open 1,320,200,16,Lowres : Curs Off : Flash Off : Hide On : Break Off 
  2.  
  3. Dim NAME$(40),LE(40),POS(40),TR$(13) : Sam Bank 12
  4. Dim XB(13),YB(13),PCK(51) : D$=Dir$
  5. Dim X1(30),Y1(30),X2(30),Y2(30),TROLL$(13)
  6.  
  7. Rem CHASE THE TROLL
  8.  
  9. Fade 3 : Wait 40 : Cls : GUESS=0 : DADSC=0 : MUMSC=0
  10. F$="HD" : If Exist(F$)=True Then HD=1 Else HD=0
  11. XB(1)=148 : YB(1)=20 : XB(2)=188 : YB(2)=20 : XB(3)=230 : YB(3)=20
  12. XB(4)=268 : YB(4)=20
  13. XB(5)=148 : YB(5)=60 : XB(6)=188 : YB(6)=60 : XB(7)=230 : YB(7)=60
  14. XB(8)=268 : YB(8)=60
  15. XB(9)=148 : YB(9)=100 : XB(10)=188 : YB(10)=100 : XB(11)=230 : YB(11)=100
  16. XB(12)=268 : YB(12)=100
  17.  
  18. Unpack 14 To 1 : Wait Vbl 
  19.  
  20. WIN:
  21.  
  22. If MUMSC=5
  23. Locate 0,23 : Paper 14 : Pen 1 : Centre Space$(36)
  24. Locate 0,23 : Paper 14 : Pen 1 : A$="Mummy wins the game" : Centre A$
  25. SPEECH=Len(A$)*4
  26. Sam Play 22 : Gosub ANI : Wait 20 : Goto PL_AGAIN
  27. End If 
  28.  
  29. If DADSC=5
  30. Locate 0,23 : Paper 14 : Pen 1 : Centre Space$(36)
  31. Locate 0,23 : Paper 14 : Pen 1 : A$="You win the game"
  32. Centre A$
  33. SPEECH=Len(A$)*5 : Sam Play 23 : Gosub ANI : Wait 20 : Goto PL_AGAIN
  34. End If 
  35.  
  36. If MUMSC>0 or DADSC>0 Then Goto SD
  37.  
  38. For X=1 To 12 : TROLL$(X)="" : Next X
  39. For X=1 To 12 : PCK(X)=99 : Next X : COUNT=0
  40. Restore N : For X=1 To 12 : Read T$ : TR$(X)=T$ : Next X
  41.  
  42.  
  43. RANNUM:
  44. If COUNT=12 Then Goto RANDI
  45. CARD=Rnd(11)+1
  46. For X=1 To 12
  47. If PCK(X)=CARD Then Goto RANNUM
  48. Next X
  49. If COUNT<12 Then Inc COUNT : PCK(COUNT)=CARD : Goto RANNUM
  50.  
  51. RANDI:
  52.  
  53. T=0
  54.  
  55. DIT:
  56.  
  57. Restore N : Inc T
  58. For X=1 To PCK(T)
  59. Read T$
  60. Next X
  61. If T<12 Then TROLL$(T)=T$ : Goto DIT
  62.  
  63. SD:
  64.  
  65. Paper 2 : Bar 148,18 To 300,150
  66.  
  67. If GUESS>0
  68. Gosub SCOS : Locate 0,23 : Paper 14 : Pen 1 : Centre Space$(36)
  69. Locate 0,23 : Paper 14 : Pen 1 : A$="Let's find another troll"
  70. Centre A$ : SPEECH=Len(A$)*4 : Sam Play 6 : Gosub ANI : Wait 20 : Goto GUES
  71. End If 
  72.  
  73. Locate 0,23 : Paper 14 : Pen 1 : Centre Space$(36)
  74. Locate 0,23 : Paper 14 : Pen 1 : A$="Can you find a troll for mummy?"
  75. Centre A$
  76. SPEECH=Len(A$)*4 : Sam Play 1 : Gosub ANI : Wait 40
  77.  
  78. Locate 0,23 : Paper 14 : Pen 1 : Centre Space$(36)
  79. Locate 0,23 : Paper 14 : Pen 1 : A$="You have three guesses"
  80. Centre A$ : SPEECH=Len(A$)*4
  81. Sam Play 2 : Gosub ANI : Wait 40
  82.  
  83. GUES:
  84.  
  85. GUESS=0
  86.  
  87. For X=1 To 12
  88. Paste Bob XB(X)-1,YB(X)-1,18
  89. Next X
  90.  
  91. Reserve Zone 6000
  92.  
  93. For X=1 To 4 : Set Zone X,XB(X),YB(X) To XB(X)+30,YB(X)+32 : Next X
  94. For X=5 To 8 : Set Zone X,XB(X),YB(X) To XB(X)+30,YB(X)+32 : Next X
  95. For X=9 To 12 : Set Zone X,XB(X),YB(X) To XB(X)+30,YB(X)+32 : Next X
  96.  
  97. CHOOSE_TROLL:
  98.  
  99. C=Rnd(11)+1 : CHOI=PCK(C)
  100. If TROLL$(CHOI)="" Then Goto CHOOSE_TROLL
  101.  
  102. USED:
  103.  
  104. Locate 0,23 : Paper 14 : Pen 1 : Centre Space$(36)
  105. If GUESS=3
  106. Locate 0,23 : Paper 14 : Pen 1 : Centre Space$(36)
  107. Locate 0,23 : Paper 14 : Pen 1 : A$="You have used up all your guesses"
  108. Centre A$ : SPEECH=Len(A$)*3 : Sam Play 21 : Gosub ANI : Wait 40
  109. Locate 0,23 : Paper 14 : Pen 1 : Centre Space$(36)
  110. Locate 0,23 : Paper 14 : Pen 1 : A$="And now...here is the troll"
  111. Centre A$ : SPEECH=Len(A$)*5 : Sam Play 7 : Gosub ANI : Wait 40
  112. TTT=PCK(CHOI) : Inc MUMSC : Paste Bob XB(CHOI),YB(CHOI),TTT
  113. Show On : Sam Play 24 : Wait 100 : Hide On 
  114. Goto WIN
  115. End If 
  116.  
  117.  
  118. ST:
  119. If GUESS=3 Then Gosub SCOS : Goto USED
  120. Locate 0,23 : Paper 14 : Pen 1 : A$="Can you find "+TROLL$(CHOI)+"?"
  121. Centre A$ : SPEECH=45 : Sam Play 3 : Gosub ANI : Wait 45 : Gosub SAMTROLL
  122. A$=TROLL$(CHOI) : SPEECH=Len(A$)*4 : Sam Play SAM : Gosub ANI : Wait 20
  123. Gosub SCOS
  124. Show On 
  125.  
  126. Timer=0 : R=0 : Repeat : CH=Mouse Zone
  127.  
  128. If Timer=500
  129. R=Rnd(2)+1 : Paper 14 : Locate 1,23 : Print Space$(36) : Timer=0
  130. End If 
  131.  
  132. If R=1
  133. Locate 0,23 : Paper 14 : Pen 1 : A$="Rock and Roll Mate" : Centre A$
  134. SPEECH=Len(A$)*4 : Sam Play 25 : Gosub ANI : Wait 20 : R=0
  135. End If 
  136.  
  137. If R=2
  138. Locate 0,23 : Paper 14 : Pen 1 : A$="Yeah, we're rockin'" : Centre A$
  139. SPEECH=Len(A$)*4 : Sam Play 26 : Gosub ANI : Wait 20 : R=0
  140. End If 
  141.  
  142. If R=3
  143. Locate 0,23 : Paper 14 : Pen 1 : A$="You're getting good at this game"
  144. Centre A$ : SPEECH=Len(A$)*4 : Sam Play 27 : Gosub ANI : Wait 20 : R=0
  145. End If 
  146.  
  147. If Mouse Key=2
  148. Hide On : Fade 3 : Wait 30 : Cls : Goto TITLE
  149. End If 
  150. Until Mouse Key=1 and CH<>0
  151.  
  152. Locate 0,23 : Paper 14 : Pen 1 : Centre Space$(36)
  153. Paste Bob XB(CH),YB(CH),PCK(CH) : Sam Play 24 : Wait 30 : Reset Zone CH
  154.  
  155. If CH<>CHOI
  156. Hide On : Inc GUESS : Locate 0,23 : Paper 14 : Pen 1
  157. A$="No that's not my baby" : Centre A$ : SPEECH=Len(A$)*4 : Sam Play 4
  158. Gosub ANI : Wait 40 : Locate 0,23
  159. Centre Space$(36) : Gosub SCOS : Goto ST
  160. End If 
  161.  
  162. If CH=CHOI
  163. Hide On : Inc GUESS : Locate 0,23 : Paper 14 : Pen 1
  164. A$="Well done, you found mummies troll" : Centre A$ : SPEECH=Len(A$)*4
  165. Sam Play 5 : Gosub ANI : Inc DADSC : Wait 30 : Gosub SCOS : Goto WIN
  166. End If 
  167.  
  168. PL_AGAIN:
  169. Pen 1 : Paper 14 : Locate 0,23 : Centre Space$(38) : Locate 0,23
  170. A$="Would you like to play again?" : Centre A$ : SPEECH=Len(A$)*5
  171. Sam Play 8 : Gosub ANI : Wait 80
  172. Pen 1 : Paper 14 : Locate 0,23 : Centre Space$(38) : Locate 0,23
  173. Centre "Left Mouse: Yes   Right Mouse: No"
  174. Wait 40 : Repeat : Until Mouse Key
  175. If Mouse Key=1
  176. Hide On : GUESS=0 : DADSC=0 : MUMSC=0 : Gosub SCOS : Goto WIN
  177. End If 
  178. If Mouse Key=2
  179. Hide On : Fade 3 : Wait 40 : Goto TITLE
  180. End If 
  181.  
  182. ANI:
  183. Bob 1,57,45,1
  184. M$="Anim 0,(14,5)(15,5)(16,5)(17,5)"
  185. Channel 1 To Bob 1 : Amal 1,M$ : Amal On 1
  186. Wait SPEECH
  187. Amal Off 1 : Bob Off 1 : Return 
  188.  
  189. SAMTROLL:
  190.  
  191. S=0 : Repeat 
  192. Inc S
  193. Until TR$(S)=TROLL$(CHOI) : SAM=S+8
  194. Return 
  195.  
  196. N:
  197. Data "Peeko Boo","Coco","April Tickety Boo","Chico","Poko Sue","Little Devil"
  198. Data "Mini Mick","Sony","Punkie","Pinkety Boo","Wayne","Bony","Mr Cool"
  199.  
  200. SCOS:
  201. Locate 2,15 : Paper 4 : Pen 1 : Print "Mummy:";MUMSC : Locate 2,17
  202. Print "Sweetie:";DADSC : Locate 2,19 : Print "Guesses:";GUESS
  203. Return 
  204.  
  205. TITLE:
  206. Erase All 
  207. If HD=0 Then Dir$="Maindisk:"
  208. Run "PLAYTIME"